<template>
  <div class="demo">
    <div class="demo-title">自定义箭头</div>
    <div class="demo-content">
      <Carousel arrows>
        <template #prevArrow>
          <div class="custom-slick-arrow" style="left: 10px; z-index: 1">
            <LeftCircleOutlined />
          </div>
        </template>
        <template #nextArrow>
          <div class="custom-slick-arrow" style="right: 10px">
            <RightCircleOutlined />
          </div>
        </template>
        <div><h3>1</h3></div>
        <div><h3>2</h3></div>
        <div><h3>3</h3></div>
        <div><h3>4</h3></div>
      </Carousel>
    </div>
  </div>
</template>

<script lang="ts" setup>
  import { LeftCircleOutlined, RightCircleOutlined } from '@ant-design/icons-vue';
  import Carousel from '@sscd/carousel';
</script>

<style lang="less" scoped>
  .demo-content {
    :deep(.slick-slide) {
      text-align: center;
      height: 160px;
      line-height: 160px;
      background: #364d79;
      overflow: hidden;
    }
    :deep(.slick-arrow.custom-slick-arrow) {
      width: 25px;
      height: 25px;
      font-size: 25px;
      color: #fff;
      background-color: rgba(31, 45, 61, 0.11);
      opacity: 0.3;
      z-index: 1;
    }
    :deep(.custom-slick-arrow:before) {
      display: none;
    }
    :deep(.custom-slick-arrow:hover) {
      opacity: 0.5;
    }
    :deep(.slick-slide h3) {
      color: #fff;
    }
  }
</style>
